# Programs.
PDFTEX = pdflatex

# Arguments.
ARGS =

# .tex files.
TEXFILES = $(shell ls *.tex)

# Main target.
TARGET: $(TEXFILES:%.tex=%.pdf)

# Rule for all.
all: $(TARGET)

# Rule for building a .tex file.
%.pdf: %.tex
	$(PDFTEX) $(ARGS) $<
	$(PDFTEX) $(ARGS) $<

.PHONY: clean

# Rule for cleaning up.
clean:
	rm *.aux *.log *.toc *~
